#include "Component.h"
#include <iostream>

using namespace std;

Component::Component(std::string _name)
	: m_name(_name)
{

}

Component::~Component()
{

}

void Component::ShowName()
{
	std::cout << m_name << std::endl;
}

void Component::Add(Component* cmp)
{
	//do nothing
}

void Component::Remove(Component* cmp)
{
	//do nothing
}

Component* Component::GetChild(int nIndex)
{
	return NULL;
}

Leaf::Leaf(std::string _name)
	: Component(_name)
{

}

Leaf::~Leaf()
{

}

void Leaf::Print()
{
	std::cout << m_name << std::endl;
}